<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <body style="padding-left: 50px">
        <h1>1/逻辑</h1>
        <h2>2/类型封装</h2>
        <div>
            <ul>
                <li>对象</li>
                <#if userObj??>
                    <font color="red">${userObj.name!}</font>
                </#if>

            </ul>
        </div>

        <h2>2,自定义函数（排序）</h2>
        <div>
            <ul>
                <li>未排序</li>
                <#assign myList=[3,6,4,8,2,1,9,20]/>
                <#list myList as item>
                    ${item},
                </#list>

                <li>已排序</li>
                <#list sort_int(myList) as item>
                    ${item},
                </#list>

            </ul>
        </div>

        <h2>3/list常用指令</h2>
        <div>
            <ul>
                <li>未排序</li>
                <#assign myList=[3,6,4,8,2,1,9,20]/>
                <#list myList as item>
                    ${item},
                </#list>

                <li>已排序</li>
                <#list myList?sort as item>
                    ${item_index}:${item}<br>
                </#list>

                <br>
                ${myList?size}<br>
                ${myList[3]}<br>

            </ul>
        </div>
    </body>
</body>
</html>